From 1815790bd3c9d4c275976b3fae4da1bff6308dc0 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 15 Aug 2014 15:09:45 -0400 Subject: [PATCH] GtkFontButton: Limit the decimals shown for size It doesn't make sense to show a font size with 6 digits. Use the same formatting we use in the font chooser widget now. https://bugzilla.gnome.org/show_bug.cgi?id=724996 --- gtk/gtkfontbutton.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkfontbutton.c b/gtk/gtkfontbutton.c index 22cca740ca..cb0822f93e 100644 --- a/gtk/gtkfontbutton.c +++ b/gtk/gtkfontbutton.c @@ -1160,7 +1160,7 @@ gtk_font_button_update_font_info (GtkFontButton *font_button) if (font_button->priv->show_size) { /* mirror Pango, which doesn't translate this either */ - gchar *size = g_strdup_printf ("%g%s", + gchar *size = g_strdup_printf ("%2.4g%s", pango_font_description_get_size (priv->font_desc) / (double)PANGO_SCALE, pango_font_description_get_size_is_absolute (priv->font_desc) ? "px" : ""); -- 2.30.2